package com.chuangtie.secondary.lining.common.response;

/**
 * @author : liaozhiwei
 * @date : 23:25 2024/7/8
 */
public enum OpenResponseCode {
    SUCCESS(1, "操作成功"),
    FAILED(0, "操作失败"),
    /**
     * 公共异常 1000-1500
     **/
    EXCEPTION(1000, "网络开小差了,请稍后再试"),
    ILLEGAL_ARGUMENT(1001, "请求参数异常"),
    ANALYSIS_REQUEST_BODY_FAILED(1002, "解析请求body数据失败"),
    BEAN_COPY_FAILED(1003, "对象拷贝失败"),
    SERIALIZE_FAILED(1004, "对象序列化失败"),
    DESERIALIZE_FAILED(1005, "对象反序列化失败"),
    CONNECTION_TIMED_OUT(1006, "链接超时"),

    /**
     * 工程基础模块 1501-1999
     */
    PROPERTY_NAME_EXIT(1501, "属性名称已存在"),
    ;
    private int code;
    private String description;

    OpenResponseCode(int code, String description) {
        this.code = code;
        this.description = description;
    }

    public int getCode() {
        return code;
    }

    public String getDescription() {
        return description;
    }
}
